﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace jmwqz
{
    public class OpenIdCache
    {
        public static void UpdateCacheOpenid()
        {
            Maticsoft.BLL.tb_freeze bfreez = new Maticsoft.BLL.tb_freeze();
            DataSet ds = Maticsoft.DBUtility.DbHelperMySQL.Query("select tu.wxid from tb_userdata tu LEFT JOIN tb_freeze tf on tu.id = tf.userid WHERE tf.state = 1");
            if (Maticsoft.Common.Util2.CheckDataSet(ds))
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    Maticsoft.Common.AppCommon.Instance.AddCache(ds.Tables[0].Rows[i][0].ToString());
                }
            }
        }
    }
}